﻿// Decompiled with JetBrains decompiler
// Type: Abp.AspNetZeroCore.Licensing.AspNetZeroLicenseChecker
// Assembly: Abp.AspNetZeroCore, Version=1.1.6.0, Culture=neutral, PublicKeyToken=null
// MVID: 698A3DA9-6833-4753-A3DC-A6AD5D2A144E
// Assembly location: E:\LarryleWork\WorkItems\PWA APP\SRC\GitCode\ProjectAppServer\aspnet-core\src\MyCompanyName.AbpZeroTemplate.Web.Core\bin\Debug\net461\Abp.AspNetZeroCore.dll

using Abp.AspNetZeroCore.Licensing;
using Abp.Dependency;
using Abp.Threading;
using Abp.Web.Models;
using Abp.Zero.Configuration;
using Castle.Core.Logging;
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Net.NetworkInformation;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Security.Cryptography;
using System.Text;
using System.Threading.Tasks;

namespace Abp.AspNetZeroCore.Licensing
{
  public sealed class AspNetZeroLicenseChecker : AspNetZeroBaseLicenseChecker, ISingletonDependency
  {
    private string _licenseCheckFilePath;
    private string _uniqueComputerId;

    public ILogger Logger { [MethodImpl(MethodImplOptions.NoInlining)] get; [MethodImpl(MethodImplOptions.NoInlining)] set; }

    [MethodImpl(MethodImplOptions.NoInlining)]
    public AspNetZeroLicenseChecker(AspNetZeroConfiguration configuration = null, IAbpZeroConfig abpZeroConfig = null, string configFilePath = "")
      : base(configuration, abpZeroConfig, configFilePath)
    {
      this.Logger = (ILogger) NullLogger.Instance;
    }

    [MethodImpl(MethodImplOptions.NoInlining)]
    public void Check()
    {
      if (this.IsThereAReasonToNotCheck())
        return;
      Task.Run((Func<Task>) (() =>
      {
        AspNetZeroLicenseChecker.PZ4IAWoEsdNDrdgg45();
        int num1;
        if (AspNetZeroLicenseChecker.KtcLbxrn63COqCP5Gr())
        {
          int num2 = 5;
          if (true)
          {
            num1 = num2;
            goto label_3;
          }
        }
        else
          goto label_7;
label_2:
        // ISSUE: variable of a compiler-generated type
        AspNetZeroLicenseChecker.\u003C\u003CCheck\u003Eb__7_0\u003Ed stateMachine;
        // ISSUE: reference to a compiler-generated field
        stateMachine.\u003C\u003E1__state = -1;
        goto label_8;
label_3:
        AsyncTaskMethodBuilder tBuilder;
        while (true)
        {
          switch (num1)
          {
            case 0:
            case 5:
              // ISSUE: reference to a compiler-generated field
              stateMachine.\u003C\u003E4__this = this;
              goto case 1;
            case 1:
            case 4:
              // ISSUE: reference to a compiler-generated field
              stateMachine.\u003C\u003Et__builder = AspNetZeroLicenseChecker.OnBvdS1GWwi5s1Qb1e();
              int num3 = 3;
              if (!AspNetZeroLicenseChecker.PZ4IAWoEsdNDrdgg45())
              {
                num1 = num3;
                continue;
              }
              goto case 2;
            case 2:
              tBuilder.Start<AspNetZeroLicenseChecker.\u003C\u003CCheck\u003Eb__7_0\u003Ed>(ref stateMachine);
              num1 = 7;
              continue;
            case 3:
              goto label_2;
            case 6:
              goto label_8;
            case 7:
              goto label_11;
            default:
              num1 = 6;
              continue;
          }
        }
label_11:
        // ISSUE: reference to a compiler-generated field
        return stateMachine.\u003C\u003Et__builder.Task;
label_7:
        num1 = 4;
        goto label_3;
label_8:
        // ISSUE: reference to a compiler-generated field
        tBuilder = stateMachine.\u003C\u003Et__builder;
        num1 = 2;
        goto label_3;
      }));
    }

    [MethodImpl(MethodImplOptions.NoInlining)]
    public void CheckSync()
    {
      try
      {
        AsyncHelper.RunSync(new Func<Task>(this.CheckInternal));
      }
      catch (AspNetZeroLicenseException ex)
      {
        AspNetZeroLicenseChecker.MJCvtdZS0tg3FxyHUS(AspNetZeroLicenseChecker.RQTTXk3hrY9rgDJsaQ((object) ex));
        AspNetZeroLicenseChecker.BN8xhoUXAur9Kn3ii9(-42);
      }
      catch (Exception ex)
      {
        AspNetZeroLicenseChecker.MJCvtdZS0tg3FxyHUS(AspNetZeroLicenseChecker.RQTTXk3hrY9rgDJsaQ((object) ex));
      }
    }

    [MethodImpl(MethodImplOptions.NoInlining)]
    private Task CheckInternal()
    {
      int num1 = 4;
      // ISSUE: variable of a compiler-generated type
      AspNetZeroLicenseChecker.\u003CCheckInternal\u003Ed__9 stateMachine;
      while (true)
      {
        AsyncTaskMethodBuilder tBuilder;
        switch (num1)
        {
          case 0:
          case 2:
            // ISSUE: reference to a compiler-generated field
            stateMachine.\u003C\u003E1__state = -1;
            break;
          case 1:
            // ISSUE: reference to a compiler-generated field
            stateMachine.\u003C\u003Et__builder = AspNetZeroLicenseChecker.OnBvdS1GWwi5s1Qb1e();
            if (!AspNetZeroLicenseChecker.KtcLbxrn63COqCP5Gr())
            {
              num1 = 6;
              continue;
            }
            int num2 = 0;
            if (AspNetZeroLicenseChecker.KtcLbxrn63COqCP5Gr())
            {
              num1 = num2;
              continue;
            }
            goto case 4;
          case 4:
            // ISSUE: reference to a compiler-generated field
            stateMachine.\u003C\u003E4__this = this;
            int num3 = 1;
            if (AspNetZeroLicenseChecker.KtcLbxrn63COqCP5Gr())
            {
              num1 = num3;
              continue;
            }
            goto label_9;
          case 5:
            tBuilder.Start<AspNetZeroLicenseChecker.\u003CCheckInternal\u003Ed__9>(ref stateMachine);
            num1 = 7;
            continue;
          case 7:
            goto label_9;
        }
        // ISSUE: reference to a compiler-generated field
        tBuilder = stateMachine.\u003C\u003Et__builder;
        num1 = 5;
      }
label_9:
      // ISSUE: reference to a compiler-generated field
      return stateMachine.\u003C\u003Et__builder.Task;
    }

    [MethodImpl(MethodImplOptions.NoInlining)]
    private bool CheckedBefore()
    {
      int num1 = 4;
      if (AspNetZeroLicenseChecker.KtcLbxrn63COqCP5Gr())
        goto label_12;
label_1:
      AspNetZeroLicenseChecker.FIvg65mf0ZBIyTBn16((object) this._licenseCheckFilePath);
      int num2 = 7;
      if (AspNetZeroLicenseChecker.KtcLbxrn63COqCP5Gr())
      {
        num1 = num2;
        goto label_12;
      }
label_2:
      string licenseCheckDate;
      if (!AspNetZeroLicenseChecker.bYCHtdRYErcLDjyyMg((object) this._licenseCheckFilePath))
      {
        if (!AspNetZeroLicenseChecker.PZ4IAWoEsdNDrdgg45())
        {
          int num3 = 6;
          if (!AspNetZeroLicenseChecker.PZ4IAWoEsdNDrdgg45())
          {
            num1 = num3;
            goto label_12;
          }
        }
        else
        {
          num1 = 5;
          goto label_12;
        }
      }
      else
      {
        licenseCheckDate = this.GetLastLicenseCheckDate();
        goto label_10;
      }
label_5:
      if (AspNetZeroLicenseChecker.pgoKLeNiDiPPgdR7CH((object) this.GetHashedValue((string) AspNetZeroLicenseChecker.aykRptsHacy0Dd1bru()), (object) licenseCheckDate))
      {
        num1 = 0;
        goto label_12;
      }
      else
        goto label_15;
label_10:
      if (!AspNetZeroLicenseChecker.pgoKLeNiDiPPgdR7CH((object) this.GetHashedValue((string) AspNetZeroLicenseChecker.KyAfWv6HkpMLohbv4c()), (object) licenseCheckDate))
        goto label_15;
      else
        goto label_5;
label_12:
      while (true)
      {
        switch (num1)
        {
          case 0:
            goto label_1;
          case 1:
          case 6:
            goto label_7;
          case 2:
          case 5:
            goto label_10;
          case 3:
            goto label_5;
          case 4:
            goto label_2;
          case 7:
            goto label_14;
          default:
            int num4 = 3;
            if (AspNetZeroLicenseChecker.KtcLbxrn63COqCP5Gr())
            {
              num1 = num4;
              continue;
            }
            goto label_14;
        }
      }
label_7:
      return false;
label_14:
      return false;
label_15:
      return true;
    }

    [MethodImpl(MethodImplOptions.NoInlining)]
    private bool IsProjectNameValid()
    {
      return this.CompareProjectName(this.GetHashedProjectName());
    }

    [MethodImpl(MethodImplOptions.NoInlining)]
    private string GetHashedProjectName()
    {
      return (string) AspNetZeroLicenseChecker.sarwqrg4CmnGYyJlTS((object) this.GetLicenseCode(), AspNetZeroLicenseChecker.DbgdaKerpsVwQ29kWT((object) this.GetLicenseCode()) - 32, 32);
    }

    [MethodImpl(MethodImplOptions.NoInlining)]
    private Task ValidateLicenseOnServer()
    {
      AspNetZeroLicenseChecker.PZ4IAWoEsdNDrdgg45();
      int num1 = !AspNetZeroLicenseChecker.KtcLbxrn63COqCP5Gr() ? 2 : 4;
      // ISSUE: variable of a compiler-generated type
      AspNetZeroLicenseChecker.\u003CValidateLicenseOnServer\u003Ed__13 stateMachine;
      AsyncTaskMethodBuilder tBuilder;
      while (true)
      {
        switch (num1)
        {
          case 0:
          case 4:
            // ISSUE: reference to a compiler-generated field
            stateMachine.\u003C\u003E4__this = this;
            goto case 1;
          case 1:
          case 2:
            // ISSUE: reference to a compiler-generated field
            stateMachine.\u003C\u003Et__builder = AspNetZeroLicenseChecker.OnBvdS1GWwi5s1Qb1e();
            num1 = 5;
            continue;
          case 3:
            // ISSUE: reference to a compiler-generated field
            tBuilder = stateMachine.\u003C\u003Et__builder;
            num1 = 6;
            continue;
          case 5:
            // ISSUE: reference to a compiler-generated field
            stateMachine.\u003C\u003E1__state = -1;
            goto case 3;
          case 6:
            tBuilder.Start<AspNetZeroLicenseChecker.\u003CValidateLicenseOnServer\u003Ed__13>(ref stateMachine);
            int num2 = 7;
            if (true)
            {
              num1 = num2;
              continue;
            }
            goto case 1;
          case 7:
            goto label_8;
          default:
            int num3 = 3;
            if (!AspNetZeroLicenseChecker.PZ4IAWoEsdNDrdgg45())
            {
              num1 = num3;
              continue;
            }
            goto case 3;
        }
      }
label_8:
      // ISSUE: reference to a compiler-generated field
      return stateMachine.\u003C\u003Et__builder.Task;
    }

    [MethodImpl(MethodImplOptions.NoInlining)]
    private string GetLicenseCodeWithoutProjectNameHash()
    {
      return (string) AspNetZeroLicenseChecker.sarwqrg4CmnGYyJlTS((object) this.GetLicenseCode(), 0, AspNetZeroLicenseChecker.DbgdaKerpsVwQ29kWT((object) this.GetLicenseCode()) - 32);
    }

    [MethodImpl(MethodImplOptions.NoInlining)]
    private async Task<LicenseValidationResult> ValidateLicense(string licenseCode)
    {
      // ISSUE: reference to a compiler-generated method
      AspNetZeroLicenseChecker.\u003CValidateLicense\u003Ed__15.X17W57doEUWhqYrdGZr();
      // ISSUE: reference to a compiler-generated method
      int num1 = AspNetZeroLicenseChecker.\u003CValidateLicense\u003Ed__15.f65EAJd34qCHeMQCFWm() ? 4 : 3;
      int num2;
      AspNetZeroLicenseChecker zeroLicenseChecker;
      LicenseValidationResult result1;
      while (true)
      {
        switch (num1)
        {
          case 0:
          case 3:
            // ISSUE: explicit reference operation
            // ISSUE: reference to a compiler-generated field
            num2 = (^this).\u003C\u003E1__state;
            num1 = 5;
            continue;
          case 1:
            // ISSUE: explicit reference operation
            // ISSUE: reference to a compiler-generated field
            (^this).\u003C\u003Et__builder.SetResult(result1);
            num1 = 6;
            continue;
          case 2:
          case 4:
            HttpClient client;
            if ((uint) num2 > 1U)
              client = new HttpClient();
            try
            {
              TaskAwaiter<HttpResponseMessage> taskAwaiter1;
              TaskAwaiter<string> taskAwaiter2;
              TaskAwaiter<HttpResponseMessage> awaiter1;
              TaskAwaiter<string> awaiter2;
              int num3;
              switch (num2)
              {
                case 0:
                  awaiter1 = taskAwaiter1;
                  // ISSUE: reference to a compiler-generated method
                  num3 = !AspNetZeroLicenseChecker.\u003CValidateLicense\u003Ed__15.X17W57doEUWhqYrdGZr() ? 13 : 27;
                  break;
                case 1:
                  awaiter2 = taskAwaiter2;
                  goto label_30;
                default:
                  num3 = 11;
                  break;
              }
label_10:
              AjaxResponse<LicenseValidationResult> ajaxResponse;
              object obj1;
              while (true)
              {
                LicenseCheckInfo licenseInfo;
                switch (num3)
                {
                  case 0:
                    // ISSUE: reference to a compiler-generated method
                    // ISSUE: reference to a compiler-generated method
                    awaiter1 = client.PostAsync("LicenseManagement/CheckLicense", (HttpContent) new StringContent((string) AspNetZeroLicenseChecker.\u003CValidateLicense\u003Ed__15.z7sAjcdbEYgHKCaJYoq((object) licenseInfo, false, false), (Encoding) AspNetZeroLicenseChecker.\u003CValidateLicense\u003Ed__15.KZ5jJmdapqtjpJbg37g(), "application/json")).GetAwaiter();
                    num3 = 4;
                    continue;
                  case 1:
                    goto label_39;
                  case 2:
                    goto label_48;
                  case 3:
                    // ISSUE: explicit reference operation
                    // ISSUE: reference to a compiler-generated field
                    (^this).\u003C\u003E1__state = num2 = 1;
                    num3 = 22;
                    continue;
                  case 4:
                    if (!awaiter1.IsCompleted)
                    {
                      num3 = 24;
                      continue;
                    }
                    goto case 14;
                  case 5:
                    // ISSUE: explicit reference operation
                    // ISSUE: reference to a compiler-generated field
                    (^this).\u003C\u003Et__builder.AwaitUnsafeOnCompleted<TaskAwaiter<HttpResponseMessage>, AspNetZeroLicenseChecker.\u003CValidateLicense\u003Ed__15>(ref awaiter1, this);
                    num3 = 12;
                    continue;
                  case 6:
                    ajaxResponse = JsonConvert.DeserializeObject<AjaxResponse<LicenseValidationResult>>(awaiter2.GetResult());
                    int num4 = 21;
                    if (true)
                    {
                      num3 = num4;
                      continue;
                    }
                    goto case 26;
                  case 7:
                    if (ajaxResponse.Result != null)
                    {
                      // ISSUE: reference to a compiler-generated method
                      // ISSUE: reference to a compiler-generated method
                      // ISSUE: reference to a compiler-generated method
                      if (AspNetZeroLicenseChecker.\u003CValidateLicense\u003Ed__15.BPfjgswf6D2cwYJXOLV((object) zeroLicenseChecker.GetHashedValue((string) AspNetZeroLicenseChecker.\u003CValidateLicense\u003Ed__15.Fl3t1MwwmwlXTrkX2MG((object) licenseInfo)), AspNetZeroLicenseChecker.\u003CValidateLicense\u003Ed__15.CZ2tFpw2ZwsuMS5fqgh((object) ajaxResponse.Result)))
                      {
                        num3 = 28;
                        continue;
                      }
                      goto label_52;
                    }
                    else
                    {
                      int num5 = 17;
                      // ISSUE: reference to a compiler-generated method
                      if (AspNetZeroLicenseChecker.\u003CValidateLicense\u003Ed__15.X17W57doEUWhqYrdGZr())
                      {
                        num3 = num5;
                        continue;
                      }
                      goto case 24;
                    }
                  case 8:
                    // ISSUE: reference to a compiler-generated method
                    ((HttpRequestHeaders) AspNetZeroLicenseChecker.\u003CValidateLicense\u003Ed__15.hUt7pDdU2ToXrPsYqmZ((object) client)).Accept.Add(new MediaTypeWithQualityHeaderValue("application/json"));
                    num3 = 9;
                    continue;
                  case 9:
                    LicenseCheckInfo licenseCheckInfo = new LicenseCheckInfo();
                    // ISSUE: reference to a compiler-generated method
                    AspNetZeroLicenseChecker.\u003CValidateLicense\u003Ed__15.lYRp05dRI0aQ1Bvtpmm((object) licenseCheckInfo, (object) licenseCode);
                    // ISSUE: reference to a compiler-generated method
                    AspNetZeroLicenseChecker.\u003CValidateLicense\u003Ed__15.FoUZLFd6G2xIZEm8O93((object) licenseCheckInfo, (object) zeroLicenseChecker._uniqueComputerId);
                    // ISSUE: reference to a compiler-generated method
                    // ISSUE: reference to a compiler-generated method
                    AspNetZeroLicenseChecker.\u003CValidateLicense\u003Ed__15.E3P1QpdsR3ISMCl8Rfj((object) licenseCheckInfo, AspNetZeroLicenseChecker.\u003CValidateLicense\u003Ed__15.K4vIp5dN1umuuihVwpF());
                    // ISSUE: reference to a compiler-generated method
                    // ISSUE: reference to a compiler-generated method
                    AspNetZeroLicenseChecker.\u003CValidateLicense\u003Ed__15.DoiKnWdeYv7CFkrWvhO((object) licenseCheckInfo, (object) AspNetZeroLicenseChecker.\u003CValidateLicense\u003Ed__15.NNvXQ9dm1BUU8iRiIUj().ToString());
                    // ISSUE: reference to a compiler-generated method
                    // ISSUE: reference to a compiler-generated method
                    AspNetZeroLicenseChecker.\u003CValidateLicense\u003Ed__15.CsPfI0dlhUxH5kqe7ST((object) licenseCheckInfo, AspNetZeroLicenseChecker.\u003CValidateLicense\u003Ed__15.cGfDvLdg8rVXQ5OtxCp());
                    // ISSUE: reference to a compiler-generated method
                    AspNetZeroLicenseChecker.\u003CValidateLicense\u003Ed__15.rhU9AudpfEpkt3hkrRI((object) licenseCheckInfo, (object) zeroLicenseChecker.GetAssemblyName());
                    // ISSUE: reference to a compiler-generated method
                    AspNetZeroLicenseChecker.\u003CValidateLicense\u003Ed__15.cYKCkmdWpR4SDL51Xg4((object) licenseCheckInfo, (object) zeroLicenseChecker.GetLicenseController());
                    licenseInfo = licenseCheckInfo;
                    int num6 = 0;
                    if (true)
                    {
                      num3 = num6;
                      continue;
                    }
                    goto case 22;
                  case 10:
                  case 27:
                    taskAwaiter1 = new TaskAwaiter<HttpResponseMessage>();
                    num3 = 15;
                    continue;
                  case 11:
                    // ISSUE: reference to a compiler-generated method
                    AspNetZeroLicenseChecker.\u003CValidateLicense\u003Ed__15.wVEpFUdZ8N18lM7Jx4q((object) client, (object) new Uri("https://www.aspnetzero.com/"));
                    num3 = 26;
                    continue;
                  case 12:
                    goto label_17;
                  case 13:
                  case 18:
                    goto label_30;
                  case 14:
                    HttpResponseMessage result2 = awaiter1.GetResult();
                    // ISSUE: reference to a compiler-generated method
                    if (AspNetZeroLicenseChecker.\u003CValidateLicense\u003Ed__15.vW2F8YdT5EOdanbiVgU((object) result2))
                    {
                      // ISSUE: reference to a compiler-generated method
                      awaiter2 = ((HttpContent) AspNetZeroLicenseChecker.\u003CValidateLicense\u003Ed__15.LdocMBd70yWf788K82R((object) result2)).ReadAsStringAsync().GetAwaiter();
                      goto case 25;
                    }
                    else
                      goto label_8;
                  case 15:
                    // ISSUE: explicit reference operation
                    // ISSUE: reference to a compiler-generated field
                    (^this).\u003C\u003E1__state = num2 = -1;
                    num3 = 14;
                    continue;
                  case 16:
                    obj1 = (object) null;
                    break;
                  case 17:
                    // ISSUE: reference to a compiler-generated method
                    object obj2 = AspNetZeroLicenseChecker.\u003CValidateLicense\u003Ed__15.ObDfmtwimf9X9mbenlh((object) ajaxResponse);
                    if (obj2 != null)
                    {
                      // ISSUE: reference to a compiler-generated method
                      obj1 = AspNetZeroLicenseChecker.\u003CValidateLicense\u003Ed__15.SBMgMewd6nTcp3l3Pv5(obj2);
                      break;
                    }
                    num3 = 16;
                    continue;
                  case 19:
                    // ISSUE: explicit reference operation
                    // ISSUE: reference to a compiler-generated field
                    (^this).\u003C\u003E1__state = num2 = -1;
                    num3 = 6;
                    continue;
                  case 20:
                    // ISSUE: explicit reference operation
                    // ISSUE: reference to a compiler-generated field
                    (^this).\u003C\u003Et__builder.AwaitUnsafeOnCompleted<TaskAwaiter<string>, AspNetZeroLicenseChecker.\u003CValidateLicense\u003Ed__15>(ref awaiter2, this);
                    num3 = 2;
                    continue;
                  case 21:
                    // ISSUE: reference to a compiler-generated method
                    if (AspNetZeroLicenseChecker.\u003CValidateLicense\u003Ed__15.uxUDngdzSdmIfH0l9fa((object) ajaxResponse))
                    {
                      int num5 = 7;
                      if (true)
                      {
                        num3 = num5;
                        continue;
                      }
                      goto case 23;
                    }
                    else
                      goto case 17;
                  case 22:
                    taskAwaiter2 = awaiter2;
                    num3 = 20;
                    continue;
                  case 23:
                    taskAwaiter1 = awaiter1;
                    num3 = 5;
                    continue;
                  case 24:
                    // ISSUE: explicit reference operation
                    // ISSUE: reference to a compiler-generated field
                    (^this).\u003C\u003E1__state = num2 = 0;
                    num3 = 23;
                    continue;
                  case 25:
                    if (!awaiter2.IsCompleted)
                    {
                      num3 = 3;
                      continue;
                    }
                    goto case 6;
                  case 26:
                    // ISSUE: reference to a compiler-generated method
                    // ISSUE: reference to a compiler-generated method
                    AspNetZeroLicenseChecker.\u003CValidateLicense\u003Ed__15.NEBmW0d1j8WwtPjqWdv((object) ((HttpRequestHeaders) AspNetZeroLicenseChecker.\u003CValidateLicense\u003Ed__15.hUt7pDdU2ToXrPsYqmZ((object) client)).Accept);
                    num3 = 8;
                    continue;
                  case 28:
                    goto label_51;
                  default:
                    num3 = 25;
                    continue;
                }
                if (obj1 == null)
                  num3 = 1;
                else
                  goto label_64;
              }
label_8:
              throw new AbpException("Failed on license check");
label_17:
              return;
label_48:
              return;
label_39:
              object obj3 = (object) "Failed on license check";
              goto label_40;
label_64:
              obj3 = obj1;
label_40:
              throw new AbpException((string) obj3);
label_51:
              throw new AspNetZeroLicenseException("Failed on license check");
label_52:
              result1 = ajaxResponse.Result;
              goto label_56;
label_30:
              taskAwaiter2 = new TaskAwaiter<string>();
              num3 = 19;
              goto label_10;
            }
            finally
            {
              if (num2 < 0 && client != null)
              {
                // ISSUE: reference to a compiler-generated method
                AspNetZeroLicenseChecker.\u003CValidateLicense\u003Ed__15.uhLcahwGvD63bNkWuWH((object) client);
              }
            }
label_56:
            // ISSUE: explicit reference operation
            // ISSUE: reference to a compiler-generated field
            (^this).\u003C\u003E1__state = -2;
            goto case 1;
          case 5:
            zeroLicenseChecker = this;
            goto case 2;
          case 6:
            goto label_50;
          default:
            int num7 = 1;
            // ISSUE: reference to a compiler-generated method
            if (!AspNetZeroLicenseChecker.\u003CValidateLicense\u003Ed__15.f65EAJd34qCHeMQCFWm())
            {
              num1 = num7;
              continue;
            }
            goto case 5;
        }
      }
label_50:;
    }

    [MethodImpl(MethodImplOptions.NoInlining)]
    private void UpdateLastLicenseCheckDate()
    {
      AspNetZeroLicenseChecker.GEjXrXl9pueXJBul8y((object) this._licenseCheckFilePath, (object) this.GetHashedValue((string) AspNetZeroLicenseChecker.KyAfWv6HkpMLohbv4c()));
    }

    [MethodImpl(MethodImplOptions.NoInlining)]
    private void MarkAsLastRequest()
    {
      AspNetZeroLicenseChecker.GEjXrXl9pueXJBul8y((object) this._licenseCheckFilePath, (object) this.GetHashedValue((string) AspNetZeroLicenseChecker.aykRptsHacy0Dd1bru()));
    }

    [MethodImpl(MethodImplOptions.NoInlining)]
    private string GetLastLicenseCheckDate()
    {
      return (string) AspNetZeroLicenseChecker.Xgh9QnpVmqEQdpoEs5((object) this._licenseCheckFilePath);
    }

    [MethodImpl(MethodImplOptions.NoInlining)]
    private static string GetUniqueComputerId()
    {
      // ISSUE: reference to a compiler-generated method
      // ISSUE: reference to a compiler-generated method
      return ((IEnumerable<NetworkInterface>) AspNetZeroLicenseChecker.EBjHuSWJEx3ieUDJPN()).Where<NetworkInterface>((Func<NetworkInterface, bool>) (nic => AspNetZeroLicenseChecker.\u003C\u003Ec.PX5WYRwvfMDptEsUQ4s((object) nic) == OperationalStatus.Up)).Select<NetworkInterface, string>((Func<NetworkInterface, string>) (nic => AspNetZeroLicenseChecker.\u003C\u003Ec.gDw4tewMU9XAVaQFnOj((object) nic).ToString())).FirstOrDefault<string>();
    }

    [MethodImpl(MethodImplOptions.NoInlining)]
    private static string GetComputerName()
    {
      return (string) AspNetZeroLicenseChecker.qi1SDGbbIGBJaLXVfw();
    }

    [MethodImpl(MethodImplOptions.NoInlining)]
    private static string GetTodayAsString()
    {
      return AspNetZeroLicenseChecker.QEbi9OaCvICKxEhB10().ToString("yyyy-MM-dd");
    }

    [MethodImpl(MethodImplOptions.NoInlining)]
    private string GetHashedValue(string str)
    {
      MD5CryptoServiceProvider cryptoServiceProvider = new MD5CryptoServiceProvider();
      try
      {
        return (string) AspNetZeroLicenseChecker.tJuDcudwTue8IiLeuiM(AspNetZeroLicenseChecker.suLvnjddcJx4UWAq4DE((object) cryptoServiceProvider, AspNetZeroLicenseChecker.fnfkrjdiSDPgCUCeTgg(AspNetZeroLicenseChecker.XnChFZTfJfynIEAtpX(), AspNetZeroLicenseChecker.eWcfYEzU9bNkysdRad((object) str, (object) this._uniqueComputerId, AspNetZeroLicenseChecker.BdF4Zl7gNKatqMaxiO((object) this)))));
      }
      finally
      {
        if (cryptoServiceProvider != null)
          AspNetZeroLicenseChecker.HRM32Jd2XUHOmpEWGL1((object) cryptoServiceProvider);
      }
    }

    [MethodImpl(MethodImplOptions.NoInlining)]
    protected override string GetSalt()
    {
      int[] numArray = new int[20];
      // ISSUE: field reference
      AspNetZeroLicenseChecker.P9gyendfrHK3fNmSI6H((object) numArray, __fieldref (\u003CPrivateImplementationDetails\u003E.\u0033D284E6AF49275CC31EE412B63AA192F25CF9095));
      return (string) AspNetZeroLicenseChecker.bhfHyQdGUkl8AT2vNvh((object) numArray);
    }

    [MethodImpl(MethodImplOptions.NoInlining)]
    private static string GetLicenseExpiredString()
    {
      int[] numArray = new int[29];
      // ISSUE: field reference
      AspNetZeroLicenseChecker.P9gyendfrHK3fNmSI6H((object) numArray, __fieldref (\u003CPrivateImplementationDetails\u003E.\u0037B199B59ED5FF97AD9D54225FD3369CA07F640C2));
      return (string) AspNetZeroLicenseChecker.bhfHyQdGUkl8AT2vNvh((object) numArray);
    }

    [MethodImpl(MethodImplOptions.NoInlining)]
    private static string StringGeneratorFromInteger(object letters)
    {
      int num1 = 25;
      if (AspNetZeroLicenseChecker.KtcLbxrn63COqCP5Gr())
        goto label_21;
label_1:
      int index1;
      ++index1;
      num1 = 19;
label_21:
      int index2;
      int index3;
      int[] numArray1;
      int index4;
      char[] chArray;
      int num2;
      int index5;
      string str;
      int[] numArray2;
      int num3;
      int num4;
      int index6;
      while (true)
      {
        switch (num1)
        {
          case 0:
            chArray = new char[letters.Length];
            num1 = 4;
            continue;
          case 1:
            num3 = num4 % 10000 / 100;
            goto case 34;
          case 2:
            goto label_1;
          case 3:
          case 27:
            index3 = 0;
            num1 = 35;
            continue;
          case 4:
            numArray1 = new int[letters.Length];
            num1 = AspNetZeroLicenseChecker.PZ4IAWoEsdNDrdgg45() ? 37 : 27;
            continue;
          case 5:
            index4 = 0;
            goto case 8;
          case 6:
            ++index4;
            num1 = 17;
            continue;
          case 7:
          case 11:
            if (index6 >= index3)
            {
              num1 = 26;
              continue;
            }
            --numArray1[index6];
            num1 = 30;
            continue;
          case 8:
          case 17:
          case 37:
            if (index4 >= index3)
            {
              int num5 = 24;
              num1 = AspNetZeroLicenseChecker.PZ4IAWoEsdNDrdgg45() ? num5 : num5;
              continue;
            }
            --numArray1[index4];
            num1 = 39;
            continue;
          case 9:
            numArray1[index3] = num3;
            num1 = 22;
            continue;
          case 10:
            str = (string) AspNetZeroLicenseChecker.dV4b4NdIbEB17nqI8RB((object) str, (object) chArray[index2].ToString());
            num1 = 33;
            continue;
          case 12:
            index2 = 0;
            num1 = 13;
            continue;
          case 13:
          case 38:
            if (index2 >= index3)
            {
              int num5 = 40;
              if (AspNetZeroLicenseChecker.KtcLbxrn63COqCP5Gr())
              {
                num1 = num5;
                continue;
              }
              goto case 31;
            }
            else
            {
              --numArray1[index2];
              num1 = 36;
              continue;
            }
          case 14:
          case 21:
            if (index5 < index3)
            {
              --numArray1[index5];
              num1 = 29;
              continue;
            }
            int num6 = 28;
            if (true)
            {
              num1 = num6;
              continue;
            }
            goto case 0;
          case 15:
            index1 = 0;
            num1 = 32;
            continue;
          case 16:
            str = (string) AspNetZeroLicenseChecker.dV4b4NdIbEB17nqI8RB((object) str, (object) ((char) num2).ToString());
            int num7 = 2;
            if (true)
            {
              num1 = num7;
              continue;
            }
            goto case 8;
          case 18:
            chArray[index3] = (char) num2;
            num1 = 9;
            continue;
          case 19:
          case 32:
            if (index1 < numArray2.Length)
            {
              num4 = numArray2[index1];
              int num5 = 5;
              if (true)
              {
                num1 = num5;
                continue;
              }
              goto case 26;
            }
            else
            {
              num1 = 12;
              continue;
            }
          case 20:
            str = (string) AspNetZeroLicenseChecker.dV4b4NdIbEB17nqI8RB((object) str, (object) chArray[index4].ToString());
            num1 = 23;
            continue;
          case 22:
            ++index3;
            num1 = 16;
            continue;
          case 23:
            index5 = index4;
            int num8 = 14;
            if (AspNetZeroLicenseChecker.KtcLbxrn63COqCP5Gr())
            {
              num1 = num8;
              continue;
            }
            goto case 19;
          case 24:
            num2 = num4 / 10000 - num4 % 100 / 10 - num4 % 10 * (num4 % 100 / 10);
            num1 = 1;
            continue;
          case 25:
            str = "";
            num1 = 0;
            continue;
          case 26:
            index2 = -1;
            num1 = 31;
            continue;
          case 28:
            index4 = -1;
            num1 = 6;
            continue;
          case 29:
            ++index5;
            num1 = 21;
            continue;
          case 30:
            ++index6;
            int num9 = 7;
            if (true)
            {
              num1 = num9;
              continue;
            }
            goto label_50;
          case 31:
            ++index2;
            num1 = 38;
            continue;
          case 33:
            index6 = index2;
            num1 = 11;
            continue;
          case 34:
            if (num3 != 0)
            {
              num1 = 18;
              continue;
            }
            goto case 16;
          case 35:
            numArray2 = (int[]) letters;
            num1 = 15;
            continue;
          case 36:
            if (numArray1[index2] == 0)
            {
              num1 = 10;
              continue;
            }
            goto case 31;
          case 39:
            if (numArray1[index4] == 0)
            {
              num1 = 20;
              continue;
            }
            goto case 6;
          case 40:
            goto label_50;
          default:
            num1 = 34;
            continue;
        }
      }
label_50:
      return str;
    }

    [MethodImpl(MethodImplOptions.NoInlining)]
    protected override string GetHashedValueWithoutUniqueComputerId(string str)
    {
      MD5CryptoServiceProvider cryptoServiceProvider = new MD5CryptoServiceProvider();
      try
      {
        return (string) AspNetZeroLicenseChecker.tJuDcudwTue8IiLeuiM(AspNetZeroLicenseChecker.suLvnjddcJx4UWAq4DE((object) cryptoServiceProvider, AspNetZeroLicenseChecker.fnfkrjdiSDPgCUCeTgg(AspNetZeroLicenseChecker.XnChFZTfJfynIEAtpX(), AspNetZeroLicenseChecker.dV4b4NdIbEB17nqI8RB((object) str, AspNetZeroLicenseChecker.BdF4Zl7gNKatqMaxiO((object) this)))));
      }
      finally
      {
        if (cryptoServiceProvider != null)
          AspNetZeroLicenseChecker.HRM32Jd2XUHOmpEWGL1((object) cryptoServiceProvider);
      }
    }

    [MethodImpl(MethodImplOptions.NoInlining)]
    private static string EncodeBase64(object ba)
    {
      int num1 = 1;
      byte[] numArray;
      int index;
      byte num2;
      StringBuilder stringBuilder;
      while (true)
      {
        switch (num1)
        {
          case 0:
          case 3:
          case 7:
            if (index < numArray.Length)
            {
              num2 = numArray[index];
              goto case 6;
            }
            else
            {
              num1 = 9;
              continue;
            }
          case 1:
            stringBuilder = new StringBuilder(ba.Length * 2);
            int num3 = 8;
            if (true)
            {
              num1 = num3;
              continue;
            }
            goto case 2;
          case 2:
          case 4:
            index = 0;
            goto case 0;
          case 5:
            ++index;
            num1 = 7;
            continue;
          case 6:
            AspNetZeroLicenseChecker.yS8Nkydk7CXIq8v7rOn((object) stringBuilder, (object) "{0:x2}", (object) num2);
            num1 = 5;
            continue;
          case 8:
            numArray = (byte[]) ba;
            AspNetZeroLicenseChecker.KtcLbxrn63COqCP5Gr();
            if (AspNetZeroLicenseChecker.PZ4IAWoEsdNDrdgg45())
            {
              num1 = 0;
              continue;
            }
            int num4 = 4;
            if (true)
            {
              num1 = num4;
              continue;
            }
            goto label_13;
          case 9:
            goto label_13;
          default:
            int num5 = 6;
            if (true)
            {
              num1 = num5;
              continue;
            }
            goto case 6;
        }
      }
label_13:
      return stringBuilder.ToString();
    }

    [MethodImpl(MethodImplOptions.NoInlining)]
    internal static bool KtcLbxrn63COqCP5Gr()
    {
      return true;
    }

    [MethodImpl(MethodImplOptions.NoInlining)]
    internal static bool PZ4IAWoEsdNDrdgg45()
    {
      return false;
    }

    [MethodImpl(MethodImplOptions.NoInlining)]
    internal static object RQTTXk3hrY9rgDJsaQ([In] object obj0)
    {
      return (object) ((Exception) obj0).Message;
    }

    [MethodImpl(MethodImplOptions.NoInlining)]
    internal static void MJCvtdZS0tg3FxyHUS([In] object obj0)
    {
      Console.WriteLine((string) obj0);
    }

    [MethodImpl(MethodImplOptions.NoInlining)]
    internal static void BN8xhoUXAur9Kn3ii9([In] int obj0)
    {
      Environment.Exit(obj0);
    }

    [MethodImpl(MethodImplOptions.NoInlining)]
    internal static AsyncTaskMethodBuilder OnBvdS1GWwi5s1Qb1e()
    {
      return AsyncTaskMethodBuilder.Create();
    }

    [MethodImpl(MethodImplOptions.NoInlining)]
    internal static bool bYCHtdRYErcLDjyyMg([In] object obj0)
    {
      return File.Exists((string) obj0);
    }

    [MethodImpl(MethodImplOptions.NoInlining)]
    internal static object KyAfWv6HkpMLohbv4c()
    {
      return (object) AspNetZeroLicenseChecker.GetTodayAsString();
    }

    [MethodImpl(MethodImplOptions.NoInlining)]
    internal static bool pgoKLeNiDiPPgdR7CH([In] object obj0, [In] object obj1)
    {
      return (string) obj0 != (string) obj1;
    }

    [MethodImpl(MethodImplOptions.NoInlining)]
    internal static object aykRptsHacy0Dd1bru()
    {
      return (object) AspNetZeroLicenseChecker.GetLicenseExpiredString();
    }

    [MethodImpl(MethodImplOptions.NoInlining)]
    internal static void FIvg65mf0ZBIyTBn16([In] object obj0)
    {
      File.Delete((string) obj0);
    }

    [MethodImpl(MethodImplOptions.NoInlining)]
    internal static int DbgdaKerpsVwQ29kWT([In] object obj0)
    {
      return ((string) obj0).Length;
    }

    [MethodImpl(MethodImplOptions.NoInlining)]
    internal static object sarwqrg4CmnGYyJlTS([In] object obj0, [In] int obj1, [In] int obj2)
    {
      return (object) ((string) obj0).Substring(obj1, obj2);
    }

    [MethodImpl(MethodImplOptions.NoInlining)]
    internal static void GEjXrXl9pueXJBul8y([In] object obj0, [In] object obj1)
    {
      File.WriteAllText((string) obj0, (string) obj1);
    }

    [MethodImpl(MethodImplOptions.NoInlining)]
    internal static object Xgh9QnpVmqEQdpoEs5([In] object obj0)
    {
      return (object) File.ReadAllText((string) obj0);
    }

    [MethodImpl(MethodImplOptions.NoInlining)]
    internal static object EBjHuSWJEx3ieUDJPN()
    {
      return (object) NetworkInterface.GetAllNetworkInterfaces();
    }

    [MethodImpl(MethodImplOptions.NoInlining)]
    internal static object qi1SDGbbIGBJaLXVfw()
    {
      return (object) Environment.MachineName;
    }

    [MethodImpl(MethodImplOptions.NoInlining)]
    internal static DateTime QEbi9OaCvICKxEhB10()
    {
      return DateTime.Now;
    }

    [MethodImpl(MethodImplOptions.NoInlining)]
    internal static object XnChFZTfJfynIEAtpX()
    {
      return (object) Encoding.UTF8;
    }

    [MethodImpl(MethodImplOptions.NoInlining)]
    internal static object BdF4Zl7gNKatqMaxiO([In] object obj0)
    {
      return (object) ((AspNetZeroBaseLicenseChecker) obj0).GetSalt();
    }

    [MethodImpl(MethodImplOptions.NoInlining)]
    internal static object eWcfYEzU9bNkysdRad([In] object obj0, [In] object obj1, [In] object obj2)
    {
      return (object) ((string) obj0 + (string) obj1 + (string) obj2);
    }

    [MethodImpl(MethodImplOptions.NoInlining)]
    internal static object fnfkrjdiSDPgCUCeTgg([In] object obj0, [In] object obj1)
    {
      return (object) ((Encoding) obj0).GetBytes((string) obj1);
    }

    [MethodImpl(MethodImplOptions.NoInlining)]
    internal static object suLvnjddcJx4UWAq4DE([In] object obj0, [In] object obj1)
    {
      return (object) ((HashAlgorithm) obj0).ComputeHash((byte[]) obj1);
    }

    [MethodImpl(MethodImplOptions.NoInlining)]
    internal static object tJuDcudwTue8IiLeuiM([In] object obj0)
    {
      return (object) AspNetZeroLicenseChecker.EncodeBase64(obj0);
    }

    [MethodImpl(MethodImplOptions.NoInlining)]
    internal static void HRM32Jd2XUHOmpEWGL1([In] object obj0)
    {
      ((IDisposable) obj0).Dispose();
    }

    [MethodImpl(MethodImplOptions.NoInlining)]
    internal static void P9gyendfrHK3fNmSI6H([In] object obj0, [In] RuntimeFieldHandle obj1)
    {
      RuntimeHelpers.InitializeArray((Array) obj0, obj1);
    }

    [MethodImpl(MethodImplOptions.NoInlining)]
    internal static object bhfHyQdGUkl8AT2vNvh([In] object obj0)
    {
      return (object) AspNetZeroLicenseChecker.StringGeneratorFromInteger(obj0);
    }

    [MethodImpl(MethodImplOptions.NoInlining)]
    internal static object dV4b4NdIbEB17nqI8RB([In] object obj0, [In] object obj1)
    {
      return (object) ((string) obj0 + (string) obj1);
    }

    [MethodImpl(MethodImplOptions.NoInlining)]
    internal static object yS8Nkydk7CXIq8v7rOn([In] object obj0, [In] object obj1, [In] object obj2)
    {
      return (object) ((StringBuilder) obj0).AppendFormat((string) obj1, obj2);
    }
  }
}
